-- GENERATED SPELL FOR [Kil'jaeden] --


function spell0_25315(pUnit, Event) --@Darkness of a Thousand Souls,Self--
pUnit:FullCastSpellOnTarget(46605,pUnit)
pUnit:RegisterEvent('Sorts_25315', 8750, 1)
end

function spell1_25315(pUnit, Event) --@Destroy All Drakes,n/a--
pUnit:FullCastSpellOnTarget(46707,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25315', 599, 1)
end

function spell2_25315(pUnit, Event) --@Fire Bloom,n/a--
pUnit:FullCastSpellOnTarget(45641,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25315', 21000, 1)
end

function spell3_25315(pUnit, Event) --@Flame Dart,Self--
pUnit:FullCastSpellOnTarget(45737,pUnit)
pUnit:RegisterEvent('Sorts_25315', 16000, 1)
end

function spell4_25315(pUnit, Event) --@Legion Lightning,n/a--
pUnit:FullCastSpellOnTarget(45664,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25315', 1500, 1)
end

function spell5_25315(pUnit, Event) --@Shadow Spike,Self--
pUnit:FullCastSpellOnTarget(46680,pUnit)
pUnit:RegisterEvent('Sorts_25315', 28750, 1)
end

function spell6_25315(pUnit, Event) --@Sinister Reflection,Self--
pUnit:FullCastSpellOnTarget(45892,pUnit)
pUnit:RegisterEvent('Sorts_25315', 647, 1)
end

function Sorts_25315(pUnit, Event)
local choix_sorts_25315 = math.random(0, 6)
if choix_sorts_25315 == 0 then
pUnit:RegisterEvent('spell0_25315', 1, 1)
end
if choix_sorts_25315 == 1 then
pUnit:RegisterEvent('spell1_25315', 1, 1)
end
if choix_sorts_25315 == 2 then
pUnit:RegisterEvent('spell2_25315', 1, 1)
end
if choix_sorts_25315 == 3 then
pUnit:RegisterEvent('spell3_25315', 1, 1)
end
if choix_sorts_25315 == 4 then
pUnit:RegisterEvent('spell4_25315', 1, 1)
end
if choix_sorts_25315 == 5 then
pUnit:RegisterEvent('spell5_25315', 1, 1)
end
if choix_sorts_25315 == 6 then
pUnit:RegisterEvent('spell6_25315', 1, 1)
end
end

function mob25315_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25315', math.random(1500, 3000), 1)
end

function mob25315_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25315_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25315_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25315, 1, 'mob25315_Action')
RegisterUnitEvent(25315, 2, 'mob25315_Leave')
RegisterUnitEvent(25315, 3, 'mob25315_Kill')
RegisterUnitEvent(25315, 4, 'mob25315_Die')
